package jroguelike.utils;

import aimozg.joglfw.GLColor;

public final class Glyph {
	public final char character;
	public final GLColor fg;
	public final GLColor bg;

	public Glyph modChar(char newChar) {
		return new Glyph(newChar, fg, bg);
	}

	public Glyph modFg(GLColor newFg) {
		return new Glyph(character, newFg, bg);
	}

	public Glyph modBg(GLColor newBg) {
		return new Glyph(character, fg, newBg);
	}

	public Glyph(char character, GLColor fg, GLColor bg) {
		this.character = character;
		this.fg = fg;
		this.bg = bg;
	}

	public Glyph(char c, GLColor fg) {
		this(c, fg, null);
	}

	@Override
	public String toString() {
		return "\'" + character + "\'";
	}
}
